package de.nroz.control;

import java.util.Locale;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import de.nroz.model.ArtikelModel;
import de.nroz.view.ViewGewerbe;

public class JGewerbeStarter
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		try
		{
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch (UnsupportedLookAndFeelException e)
		{
			// handle exception
		}
		catch (ClassNotFoundException e)
		{
			// handle exception
		}
		catch (InstantiationException e)
		{
			// handle exception
		}
		catch (IllegalAccessException e)
		{
			// handle exception
		}

		Locale.setDefault(Locale.GERMAN);
//		new ViewArtikel(new Artikel());
		new JGewerbeStarter();
	}

	public JGewerbeStarter()
	{
		DBUtil.getInstance().openConnection();
		ArtikelModel model = DBUtil.getInstance().getList();
		ViewGewerbe view = new ViewGewerbe(model);
		new ControlGewerbe(model, view);
	}

}
